//服务器入口文件
const Koa = require('koa');
const app = new Koa();

//总耗时中间件
const resDurationMiddleWare = require('./middleware/response_duration');
app.use(resDurationMiddleWare);

//响应头中间件
const resHeaderMiddleWare = require('./middleware/response_header');
app.use(resHeaderMiddleWare);

//业务逻辑中间件
const resDtaMiddleWare = require('./middleware/response_data');
app.use(resDtaMiddleWare);

app.listen(3000, () => {
  console.log('服务器启动成功');
})